POV-Ray : Newsgroups : povray.general : Random thoughts about povray and xml : Re: Random thoughts about povray and xml Server Time
3 Aug 2024 14:11:05 EDT (-0400)
  Re: Random thoughts about povray and xml  
From: Warp
Date: 20 Mar 2004 15:07:47
Message: <405ca493@news.povray.org>
This reminds me of MathML, which is an XML-style way of representing
mathematical formulas.

  Example:

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<maction>
<mrow>
  <mi>x</mi>
  <mo>=</mo>
  <mfrac>

    <mrow>
      <mrow>
        <mo>-</mo>
        <mi>b</mi>
      </mrow>

      <msqrt>

        <mrow>
          <msup>
            <mi>b</mi>
            <mn>2</mn>
          </msup>
          <mo>-</mo>
          <mrow>

            <mn>4</mn>
            <mi>a</mi>
            <mi>c</mi>
          </mrow>
        </mrow>
      </msqrt>
    </mrow>

    <mrow>
      <mn>2</mn>
      <mi>a</mi>
    </mrow>
  </mfrac>
</mrow>
</maction>
</math>

  Compare that to for example how the same thing is done in LaTeX:

\begin{equation}
  x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\end{equation}

  Now, which one is easier to write and read?

  What I wonder is this: If XML is not intended to be written and read
by humans, then why make it so bloated? Why not make a compact binary
format instead?
  Imagine for example an image format in XML. What the h*** would be the
idea with that?

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.